import Vue from 'vue'
import App from './App.vue'
import router from './views/router/index'
// 导入element-ui库
import ElementUI from 'element-ui'
// 导入iconfont阿里巴巴图库的样式
import './assets/icon/iconfont.css?t=1111'
// 导入公共js
import {
  warnMessage,
  errorMessage,
  closeMessage,
  URLOBJ
} from './views/utils/js/index'

Vue.prototype.$warnMessage = warnMessage;
Vue.prototype.$errorMessage = errorMessage;
Vue.prototype.$closeMessage = closeMessage;
Vue.prototype.$URLOBJ = URLOBJ;

import {
  clearStr,
  compute_next_step,
  traverse_tree1,
  getDefaultCheckedKeys,
  genResult,
} from './views/setting/js/setting'

Vue.prototype.$clearStr = clearStr;
Vue.prototype.$compute_next_step = compute_next_step;
Vue.prototype.$traverse_tree1 = traverse_tree1;
Vue.prototype.$getDefaultCheckedKeys = getDefaultCheckedKeys;
Vue.prototype.$genResult = genResult;

import {
  parseDom,
  openFullScreenLoading,
  closeFullScerenLoading
} from './views/preview/js/preview'

Vue.prototype.$parseDom = parseDom;
Vue.prototype.$openFullScreenLoading = openFullScreenLoading;
Vue.prototype.$closeFullScerenLoading = closeFullScerenLoading;


Vue.use(ElementUI);
Vue.config.productionTip = false; //阻止 vue 在启动时生成生产提示
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串

//判断是否chorme浏览器
if (userAgent.indexOf("Chrome") > -1) {
  new Vue({
    router,
    render: h => h(App)
  }).$mount('#app');
} else {
  document.getElementById("tips").style.display = "flex";
}
